<template>
	<view class="SOdetiles">
		<view class="SOdetiles-table">
			<view class="DWD-li">
				<view class="DWD-li-title">单号</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493NO || "" }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">车型</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA02 || "" }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">厂家</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA00 || "" }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">卸货地点</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA01 || "" }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">物料类型</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA06 || "" }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">收料单价</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA07 }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">总吨数</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA08 }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">未完成吨数</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA10 }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">已完成吨数</view>
				<view class="DWD-li-text">{{ completedTon() }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">在途吨数</view>
				<view class="DWD-li-text">{{ detailsList.ztzl }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">亏吨范围</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA25 }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">冻结金额</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA12 }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">超时时间</view>
				<view class="DWD-li-text">{{ detailsList.ORMTB493CA27 }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">是否公开</view>
				<view class="DWD-li-text" v-if="detailsList.ORMTB493CA31 == '1'">不公开</view>
				<view class="DWD-li-text" v-if="detailsList.ORMTB493CA31 == '2'">公开</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">是否指定</view>
				<view class="DWD-li-text" v-if="detailsList.ORMTB493CA30 == '1'">指定车辆</view>
				<view class="DWD-li-text" v-if="detailsList.ORMTB493CA30 == '2'">不指定车辆</view>
			</view>
			<view class="DWD-li" v-if="detailsList.ORMTB493CA30 == '1'">
				<view class="DWD-li-title">指定车号</view>
				<view class="DWD-li-text">
					{{ detailsList.ORMTB460CA90.join(",") }}</view>
			</view>
			<view class="DWD-li">
				<view class="DWD-li-title">接单冻结</view>
				<view class="DWD-li-text" v-if="detailsList.ORMTB493CA32 == '0'">不冻结</view>
				<view class="DWD-li-text" v-if="detailsList.ORMTB493CA32 == '1'">冻结</view>
			</view>
		</view>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
export default {
	components: {},
	data() {
		return {
			detailsList: "",
		};
	},
	watch: {},
	onLoad(option) {
		const item = JSON.parse(decodeURIComponent(option.item));
		this.detailsList = item;
		console.log("detailsList", this.detailsList);
	},
	mounted() { },
	methods: {
		completedTon() {
			const ton1 = Number(this.detailsList.ORMTB493CA08) || 0;
			const ton2 = Number(this.detailsList.ORMTB493CA10) || 0;
			return ton1 - ton2;
		},
	},
};
</script>

<style scoped>
.popup_cell-photo {
	margin: 0 30rpx;
}

.photo {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 20rpx;
}

.photo-img {
	width: 300rpx;
	height: 200rpx;
}

.photo-img2 {
	width: 400rpx;
	height: 400rpx;
}

.SOdetiles-table {
	/* padding: 30rpx 40rpx 0; */
}

.DWD-li {
	display: flex;
	min-height: 70rpx;
	line-height: 70rpx;
	box-sizing: border-box;
	border: 1rpx solid #f2f2f2;
	font-size: 32rpx;
	color: #333;
}

.DWD-li>view {
	padding: 0 15rpx;
	min-height: 70rpx;
	/* overflow: hidden; */
	box-sizing: border-box;
}

.DWD-li-title {
	width: 30%;
	text-align: center;
	border-right: 1rpx solid #f2f2f2;
	background: #70dbdb;
	/* background-color: rgba(0, 163, 255, .1); */
}

.DWD-li-text {
	width: 70%;
}

.DWD-li+.DWD-li {
	border-top: none;
}

.DWD-table {
	display: flex;
}

.DWD-table-left-flex {
	flex: 1;
}

.DWD-table>view>view {
	padding: 0 15rpx;
	height: 70rpx;
	line-height: 70rpx;
	overflow: hidden;
	text-align: center;
	border-right: 1rpx solid #f2f2f2;
	border-bottom: 1rpx solid #f2f2f2;
	box-sizing: border-box;
}

.DWD-table>view>view:first-child {
	background-color: rgba(0, 163, 255, 0.1);
}

.DWD-table-left-title>view {
	width: 101rpx;
	text-align: center;
	background-color: rgba(0, 163, 255, 0.1);
}

.DWD-table .DWD-table-left-title>view {
	padding: 0 5rpx;
	height: 70rpx;
	line-height: 70rpx;
	overflow: hidden;
	box-sizing: border-box;
	border-left: 1rpx solid #f2f2f2;
	border-bottom: 1rpx solid #f2f2f2;
}

.DWD-btn {
	margin: 70rpx 100rpx 0;
}

.DWD-btn button {
	background-color: #ff0000;
	color: #fff;
	font-size: 30rpx;
}

.DWD-btn button+button {
	margin-top: 30rpx;
}

.DWD-btn .DWD-btn-color {
	background-color: #007aff;
}

.slot-content {
	padding: 20rpx 40rpx;
}

.popup_title {
	font-size: 36rpx;
	font-weight: 700;
	text-align: center;
	padding: 30rpx;
}

.popup_cell {
	margin: 0 30rpx;
	padding: 10rpx 0;
	margin-bottom: 10rpx;
	border-bottom: 2rpx solid #ebebeb;
	display: flex;
	align-items: center;
}

.popup_cell.upload_area {
	align-items: flex-start;
}

.upload_wrap {
	margin-left: 32rpx;
	width: 120rpx;
	height: 120rpx;
	display: flex;
	justify-content: center;
	align-items: center;
}

.upload_img {}

.upload_placeholder {}

.popup_cell-label {
	font-size: 30rpx;
	color: #666666;
	width: 150rpx;
	text-align: right;
}

.popup_cell_value {
	flex: 1;
}

.popup_cell_input {
	font-size: 32rpx;
	width: 100%;
	height: 60rpx;
	padding: 0 20rpx;
}

.input-placeholder {
	font-size: 30rpx;
}

.popup_btn {
	background-color: #007aff;
	margin: 60rpx;
	color: #ffffff;
}
</style>
